package com.peycard.common;

import java.io.Serializable;

public class PortalUserDTO implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long idPortalUser;
	private String firstName;
	private String lastName;
	private String user;
	private String password;
	private int firstAccess;
	private String email;
	private String securityQuestion;
	private String answerQuestion;
	private String company;
	private String area;
	private String username;
	private int isActive;
	private String rol;
	private int auditNumber;

	public long getIdPortalUser() {
		return idPortalUser;
	}

	public void setIdPortalUser(long idPortalUser) {
		this.idPortalUser = idPortalUser;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getFirstAccess() {
		return firstAccess;
	}

	public void setFirstAccess(int firstAccess) {
		this.firstAccess = firstAccess;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getSecurityQuestion() {
		return securityQuestion;
	}

	public void setSecurityQuestion(String securityQuestion) {
		this.securityQuestion = securityQuestion;
	}

	public String getAnswerQuestion() {
		return answerQuestion;
	}

	public void setAnswerQuestion(String answerQuestion) {
		this.answerQuestion = answerQuestion;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public int getIsActive() {
		return isActive;
	}

	public void setIsActive(int isActive) {
		this.isActive = isActive;
	}

	public String getRol() {
		return rol;
	}

	public void setRol(String rol) {
		this.rol = rol;
	}

	public int getAuditNumber() {
		return auditNumber;
	}

	public void setAuditNumber(int auditNumber) {
		this.auditNumber = auditNumber;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((answerQuestion == null) ? 0 : answerQuestion.hashCode());
		result = prime * result + ((area == null) ? 0 : area.hashCode());
		result = prime * result + auditNumber;
		result = prime * result + ((company == null) ? 0 : company.hashCode());
		result = prime * result + ((email == null) ? 0 : email.hashCode());
		result = prime * result + firstAccess;
		result = prime * result
				+ ((firstName == null) ? 0 : firstName.hashCode());
		result = prime * result + (int) (idPortalUser ^ (idPortalUser >>> 32));
		result = prime * result + isActive;
		result = prime * result
				+ ((lastName == null) ? 0 : lastName.hashCode());
		result = prime * result
				+ ((password == null) ? 0 : password.hashCode());
		result = prime * result + ((rol == null) ? 0 : rol.hashCode());
		result = prime
				* result
				+ ((securityQuestion == null) ? 0 : securityQuestion.hashCode());
		result = prime * result + ((user == null) ? 0 : user.hashCode());
		result = prime * result
				+ ((username == null) ? 0 : username.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PortalUserDTO other = (PortalUserDTO) obj;
		if (answerQuestion == null) {
			if (other.answerQuestion != null)
				return false;
		} else if (!answerQuestion.equals(other.answerQuestion))
			return false;
		if (area == null) {
			if (other.area != null)
				return false;
		} else if (!area.equals(other.area))
			return false;
		if (auditNumber != other.auditNumber)
			return false;
		if (company == null) {
			if (other.company != null)
				return false;
		} else if (!company.equals(other.company))
			return false;
		if (email == null) {
			if (other.email != null)
				return false;
		} else if (!email.equals(other.email))
			return false;
		if (firstAccess != other.firstAccess)
			return false;
		if (firstName == null) {
			if (other.firstName != null)
				return false;
		} else if (!firstName.equals(other.firstName))
			return false;
		if (idPortalUser != other.idPortalUser)
			return false;
		if (isActive != other.isActive)
			return false;
		if (lastName == null) {
			if (other.lastName != null)
				return false;
		} else if (!lastName.equals(other.lastName))
			return false;
		if (password == null) {
			if (other.password != null)
				return false;
		} else if (!password.equals(other.password))
			return false;
		if (rol == null) {
			if (other.rol != null)
				return false;
		} else if (!rol.equals(other.rol))
			return false;
		if (securityQuestion == null) {
			if (other.securityQuestion != null)
				return false;
		} else if (!securityQuestion.equals(other.securityQuestion))
			return false;
		if (user == null) {
			if (other.user != null)
				return false;
		} else if (!user.equals(other.user))
			return false;
		if (username == null) {
			if (other.username != null)
				return false;
		} else if (!username.equals(other.username))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "PortalUserDTO [idPortalUser=" + idPortalUser + ", firstName="
				+ firstName + ", lastName=" + lastName + ", user=" + user
				+ ", password=" + password + ", firstAccess=" + firstAccess
				+ ", email=" + email + ", securityQuestion=" + securityQuestion
				+ ", answerQuestion=" + answerQuestion + ", company=" + company
				+ ", area=" + area + ", username=" + username + ", isActive="
				+ isActive + ", rol=" + rol + ", auditNumber=" + auditNumber
				+ "]";
	}

}